package com.hcbxwy.feign.controller;

import com.hcbxwy.feign.service.HelloFeignService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * Hello Feign
 *
 * @author Daman
 * @since 2020/1/16 21:27
 */
@RestController
@RequestMapping("feign")
public class HelloFeignController {

    @Resource
    private HelloFeignService helloFeignService;

    @GetMapping("/search/github")
    public String searchRepo(@RequestParam("str") String queryStr){
        return helloFeignService.searchRepo(queryStr);
    }
}
